package singleton;

/**
 * @author shenhan
 * @create 2020/3/18 22:11
 * @description 饿汉式
 */
public class Singleton1 {
    private Singleton1() {}

    private static Singleton1 instance = new Singleton1();

    public static Singleton1 getInstance() {
        return instance;
    }

    public static void main(String[] args) {
        final Singleton1 instance = getInstance();
    }
}
